function outvec = fw_fill(invec)

outvec = invec;

for i = 2:length(invec)
    if isnan(invec(i)) && isfinite(outvec(i-1))
        outvec(i) = outvec(i-1);
    end
end